<?php
// 代理模式
// 将内部的方法交给其他类去解决
// 
interface Subject {public function operation();}

class MySubject implements Subject
{
	public function operation()
	{

	}
}

class Proxy implements Subject
{
	protected $subject;

	public function __construct()
	{
		$this->subject = new MySubject;
	}

	public function operation()
	{
		return $this->subject->operation();
	}
}